home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_07 / plauger / isget.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-03  |  287 b   |  17 lines

  1. // isget -- istream::get()
  2. #include <istream>
  3.  
  4. int istream::get()
  5.     {    // get a character
  6.     int ch;
  7.     _TRY_IO_BEGIN
  8.     if (!ipfx(1) || (ch = rdbuf()->sbumpc()) == EOF)
  9.         setstate(failbit), _Chcount = 0, ch = EOF;
  10.     else
  11.         _Chcount = 1;
  12.     isfx();
  13.     _CATCH_IO_END
  14.     return (ch);
  15.     }
  16.  
  17.